<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	    		xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:c="http://java.sun.com/jstl/core"
				template="layouts/standard.xhtml">

<ui:define name="content">

<div class="section">
	<h3>Введите имя и пароль, полученные при регистрации в оргкомитете</h3>
	<c:if test="${not empty param.login_error}">
		<div class="errors">
			#{sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
		</div>
	</c:if>
	<form name="f" action="${request.contextPath}/action/loginProcess" method="post">
		<fieldset>
			<div class="field">
				<div class="label">Участник:</div>
				<div class="output">
					<c:if test="${not empty param.login_error}">
						<c:set var="username" value="${sessionScope.SPRING_SECURITY_LAST_USERNAME}"/>
					</c:if>
					<input type="text" name="j_username" value="#{username}"/>
				</div>
			</div>
			<div class="field">
				<div class="label">Пароль:</div>
				<div class="output">
					<input type="password" name="j_password" />
				</div>
			</div>
			<div class="field">
				<div class="label"></div>
				<div class="output">
					<input type="checkbox"	name="_spring_security_remember_me"/>
					не спрашивать следующий раз
					<!-- see:
					http://static.springsource.org/spring-security/site/docs/2.0.x/reference/remember-me.html
					http://static.springsource.org/spring-security/site/docs/2.0.x/apidocs/constant-values.html
					  create table persistent_logins (username varchar(64) not null, series varchar(64) primary key, token varchar(64) not null, last_used timestamp not null)
					 --> 
				</div>
			</div>
		</fieldset>
		<div class="buttonGroup">
			<input name="submit" type="submit" value="Вход" />
		</div>
	</form>
</div>

</ui:define>
</ui:composition>